package com.ruoyi.youtian.mapper;


import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.youtian.domain.TSceneCategory;
import com.ruoyi.youtian.domain.vo.ScenePointVo;
import com.ruoyi.youtian.domain.vo.SourceTagVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 场景Mapper接口
 *
 * @author ruoyi
 * @date 2022-09-12
 */
public interface TSceneCategoryMapper
{
    /**
     * 查询场景
     *
     * @param sceneId 场景主键selectTScenceCategoryList
     * @return 场景
     */
    public TSceneCategory selectTSceneCategoryBySceneId(Long sceneId);

    /**
     * 查询场景列表
     *
     * @param tScenceCategory 场景
     * @return 场景集合
     */
    @DataScope(deptAlias = "d")
    public List<TSceneCategory> selectTSceneCategoryList(TSceneCategory tScenceCategory);

    /**
     * 新增场景
     *
     * @param tSceneCategory 场景
     * @return 结果
     */
    public int insertTSceneCategory(TSceneCategory tSceneCategory);

    /**
     * 修改场景
     *
     * @param tSceneCategory 场景
     * @return 结果
     */
    public int updateTSceneCategory(TSceneCategory tSceneCategory);

    /**
     * 删除场景
     *
     * @param sceneId 场景主键
     * @return 结果
     */
    public int deleteTSceneCategoryBySceneId(Long sceneId);

    /**
     * 批量删除场景
     * @param sceneIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTSceneCategoryBySceneIds(Long[] sceneIds);

    /**
     *  根据场景Id查询检测点属性列表
     * @param sceneIdList
     * @return
     */
    @DataScope(deptAlias = "d")
    public List<ScenePointVo> selectScenePointVoListBySceneIdList(@Param("list") List<Long> sceneIdList,@Param("pointName") String pointName,@Param("sceneName") String sceneName);

    /**
     * 某场景下所有点位的实时值
     * @param sceneId
     * @return
     */
    @DataScope(deptAlias = "tag")
    public List<SourceTagVo> selectSourceTagListBySceneId(Long sceneId);

    @DataScope(deptAlias = "sc")
    public List<SourceTagVo> selectSourceTagAllList(Long sceneId);


    /**
     *  查询某点位下历史记录值
     * @param sourceTagVo sourceTag  time
     * @return
     */
    @DataScope(deptAlias = "tag")
    public List<SourceTagVo> selectSourceTagHistoryListBySourceTag(SourceTagVo sourceTagVo);

    List<TSceneCategory> selectTSceneCategoryreoList(TSceneCategory tScenceCategory);

    /**
     * 删除场景与点位关联表
     * @param sceneId
     * @return
     */
    public int deleteTScenePointBySceneId(Long sceneId);

    List<TSceneCategory> selectTSceneCategoryreList(TSceneCategory tScenceCategory);

    /**
     *  根据场景Id查询检测点属性列表(新增搜索条件)
     * @param scenePointVo
     * @return
     */
    @DataScope(deptAlias = "d")
    public List<ScenePointVo> selectScenePointVoListBySceneIdListreo(@Param("pointvo") ScenePointVo scenePointVo);

}
